/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package ormsamples;

import org.orm.*;
public class ListEncriptacionData {
	private static final int ROW_COUNT = 100;
	
	public void listTestData() throws PersistentException {
		System.out.println("Listing En_logs...");
		orm.En_logs[] ormEn_logses = orm.En_logsDAO.listEn_logsByQuery(null, null);
		int length = Math.min(ormEn_logses.length, ROW_COUNT);
		for (int i = 0; i < length; i++) {
			System.out.println(ormEn_logses[i]);
		}
		System.out.println(length + " record(s) retrieved.");
		
	}
	
	public void listByCriteria() throws PersistentException  {
		System.out.println("Listing En_logs by Criteria...");
		orm.En_logsCriteria en_logsCriteria = new orm.En_logsCriteria();
		// Please uncomment the follow line and fill in parameter(s) 
		//en_logsCriteria.lo_id_logs.eq();
		en_logsCriteria.setMaxResults(ROW_COUNT);
		orm.En_logs[] ormEn_logses = en_logsCriteria.listEn_logs();
		int length =ormEn_logses== null ? 0 : Math.min(ormEn_logses.length, ROW_COUNT); 
		for (int i = 0; i < length; i++) {
			 System.out.println(ormEn_logses[i]);
		}
		System.out.println(length + " En_logs record(s) retrieved."); 
		
	}
	
	public static void main(String[] args) {
		try {
			ListEncriptacionData listEncriptacionData = new ListEncriptacionData();
			try {
				listEncriptacionData.listTestData();
				//listEncriptacionData.listByCriteria();
			}
			finally {
				orm.EncriptacionPersistentManager.instance().disposePersistentManager();
			}
		}
		catch (Exception e) {
			e.printStackTrace();
		}
	}
}
